home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
graphics
/
crumbl11.zip
/
CRUMBLER.DOC
< prev
next >
Wrap
Text File
|
1994-05-19
|
21KB
|
445 lines
- 1 -
CRUMBLER (c) Carlo Moretti May 1994
(Release 1.1b)
by
Carlo Moretti
e-mail: sis2g19@ganimede.csr.unibo.it
or einn93_5@cobra.csr.unibo.it
INTRO.
======
This program creates STEREOGRAMS using the simplest algorithm that
could flash into my mind. I've REALLY never saw an algorithm to create a
SIRDS, but I was intersted on, so I decided to create one myself.
CRUMBLER is written in C language and compiled with Borland C++ 3.0
I think it could work on every MS-DOS compatible (286, 386, 486...)
and it DOESN'T require any kind of graphic board (well, You need one just
when wanna see the output image...).
WHAT'S NEW
==========
Yeah, this is the second release of CRUMBLER and there are a lot of news:
∙ Now CRUMBLER is able to produce SIRDS (without using a file pattern).
∙ It can now 'crumble' images up to 4096*XXXX pixels.
∙ Pattern fitting can start from Left, Right or Center; this sometimes
could help (somehow) to reduce the echo.
∙ There is a 'Skeleton method' to create 'skeleton-like' effects.
∙ There's a new '+d64k' source depth feature to 'smooth' 3d objects.
∙ There is a 3DStudio Material LIbrary to map Your 3d objects correctly.
∙ There are 5 'gradient' images to map 3d objects in POV-Ray, and other 3d
programs.
∙ There are 3 pattern images ready to use.
∙ There is an input file to use as example.
WHAT'S OBSOLETE
===============
Sure I didn't take care of input-output type images, so these are still
uncompressed truecolor Targa files.
Moreover pattern and input file MUST be in the current directory.
WHAT'S GREAT!
=============
The REALLY GREAT thing is that CRUMBLER is able to generate stereograms with
!!!!! 16777216 !!!!! (read: 'more than 16 millions'!!!) of depth planes.
Ok, I think no one could count them, and no one could find any difference
between a 4096 layered stereogram and a 16m one, anyway I can say it's
flexable 'cause it can produce: 256, 768, 4096 and 16777216 depth levels.
(Obviously it depends on input file colors used).
- 2 -
It generates TRUECOLOR file output and reads truecolor input and pattern
(This is not so great because a 1024x768x24bit uncompressed image takes
about 2.4M on your Hard Disk (!))
CRUMBLER is easy to use after 3DStudio or other 3D good softwares.
It takes about 1.5 minutes to 'crumble' a 1024x768 image on a 486DX2/50,
but if You use 'smartdrv.sys' or other I/O-buffers it can be about twice
time quicker, computing about 20500 pixel per second.
CRUMBLER is able to crumble Targa files of ANY RESOLUTION: You can use
images up to 65535 x 65535 x 24 bit color. (Why don't You try?!)
WHAT'S NOT SO GREAT (moan..)
============================
Input images MUST be: "uncompressed 24 bit Targa files type 10 or type 0";
Output images can be ONLY: "uncompressed 24 bit Targa files type 10".
Anyway You can create source images with a lot of programs:
. 3DStudio (r1, r2, r3)
. P.O.V.ray (r1.0, r2.0, r2.1, r2.2 and every other compatible version)
. Alchemy (ev'ry version I know) by typing "alchemy -a10 -24 <source_image>"
. Photo Styler (1.0, 1.1, 2.0 ...)
. Imagine 2.0 (PC's version)
. many others...
Another problem I can't solve is the ECHO!!! I added the +f option (see
the syntax), but I really need an anti-echo algorithm.
SYNTAX
======
CRUMBLER requires 2 ORDERED file names and 5 optional parameters:
>CRUMBLER <input[.TGA]> <output[.TGA]> [+options]
Input file is the same of version 1.0 (see INPUT DEPTH IMAGE session);
output file is now checked (see +o flag); pattern file becomes optional
(see +p option).
CRUMBLER will use the pattern file (if used) until its end (or the end
of input file). If the pattern file Y resolution is less than the input
one, CRUMBLER will then start using the last raw pattern file, displaying
a message.
Output file dimension is: ((h_res * v_res * 3) + 18) as should be the
input image too.
[OPTIONS]:
+wXXX tells the proggie the width of the pattern to superimpose.
Valid range is 96..256.
It must be less or equal than the pattern file h_res. if used.
+p<pattern_file_name[.TGA]> If specified tells crumbler to create a SIS
using the shown pattern file. If NOT used,
crumbler will create and use a random pattern
to produce a SIRDS.
- 3 -
+dXXXX tells about source image:
'256' will use a source image 'averaging' the RGB values for each
pixels (more the pixel is bright, more it becomes near)
This is common to use with a gray scale source image:
every of the 256 grays (from [0,0,0] to [255,255,255])
represents a depth level.
A RGB color (R=100, G=30, B=80) is like a 'gray=70' value and
the depth level used is the 70th from background.
'768' will 'add' the RGB values (R+B+G) to perform 768 levels
(example: R=5, G=100, B=230 is evaluated as the 335th depth
plane from background; more brigth, more near)
With this option the RGB color (R=10, G=70, B=123) is
exactly equal to (R=40, G=102, B=61) and means the 203th
depth plane from back.
'4096' will evaluate the formula: r*16+g+b/16. This will give You
4096 depth levels. It's hard to create a source images of
this type without a 3d program and an image map!
'64k' this new feature lets You create 65536 depth levels with a
smoother appearance. There's a new map image for 3d softwares
which let CRUMBLER recognize 3d software's colors approximation
like antialiasing or motion blur. It uses RED and GREEN primary
colors: for each even RED values GREEN values are 0..255, while
for odd RED values GREEN becomes 255..0
'16m' tells CRUMBLE to evaluate: r*65536+g*255+b. Red is the most
significant primary color, blue could be omitted (I'm sure
You can't see 'blue variation').
This is done for images created with 3d softwares and mapping
the objects with a given image map.
DON'T try to use strange color configurations if You
want to see a nice result (read "a normal stereogram").
+f[l|c|r] tells crumbler where the pattern fitting should start from:
'l' means left and it's the cause of a right echo.
'r' means right and causes a 'left transfered' echo.
'c' means pattern fitting starts from center and probably causes
both sided echo (I tried this hoping to attenuate the echo!!!).
Results about echo strongly depend on the source images.
+o If the specified output file already exists, crumbler will overwrite
it if '+o' is used; otherwise (if +o is omissed) it returns an
error message.
+sXXX tells crumbler to 'slice' the 3d object by inverting a number of
depth planes. This will give a 'skeleton' appearance to Your object
(try using this and You'll understand what I mean!)
Valid range is 0..64: '0' means OFF, '1' means CROSS-EYED viewing,
'2' will create 2 inverted slices of Your objects, and so on.
(It's easier to use that than to say what does it do!!)
See the 'QUICKSTART' in the README.1ST file for some examples.
- 4 -
USING CRUMBLER AFTER A 3D PROGRAM
=================================
If You are able to use a 3d program like 3DStudio (this is from AutoDesk
and it's NOT a PD software), POV-Ray, Vivid or other 'render/raytracing'
programs, I suggest You to use an image map as a texture for Your entire
scene as shown:
(Back) ░░░░░░░░░░░░░░░░ Black (0,0,0)
░░░░░░░░░░░░░░░░ ^
░░░░░░░░░░░░░░░░ |
░░░░░░░░░░░░░░░░ | (...dark red...)
________ ░░░░░░░░░░░░░░░░ |
| |░░░░░░░░░░░░░░░░ |
| |▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Red (255,0,0 or any other full primary color)
| |▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ^
| 3D |▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ |
| object |▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ | (...red-violet...)
| |▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ |
| |▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ |
|________|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ Red&Blue (255,0,255 or any other combination of 2
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ^ primary colors)
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ |
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ | (...pink...)
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ |
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ |
(Fore) ████████████████ White (255,255,255)
(This map will let CRUMBLE be able to create 768 depth levels)
The planar mapping and the camera should be parallel, and the object
should be bright near the camera and dark far from it.
Crumbler 1.1 is provided 4 image maps:
∙ 256__cru.tga is a grey scaled map to use with +d256 option
∙ 768__cru.tga is the map shown above to use with +d768
∙ 4096_cru.tga is to use with +d4096 (4096 raw to create 4096 depth levels)
∙ 16384cru.tga to use with +d16m (creates 16384 depth levels)
∙ 65536cru.tga for +d64k (again 16384 depth levels, but looks smoother)
Actually I can't find a program to create (and use) a tga file with up to
65535 raws, so if You want more depth levels You must create Your source
file Your own (good luck!).
Probably any programs can't read a 16384 raw image file, so You should
use a lower color level map to obtain a lower depth levelled stereogram.
Pleas, DON'T try to convert those map files with a JPEG compression,
because it will cause a considerable distorsion in the input file.
*IMPORTANT*:
The 3d program scene must NOT include any kind of light. You must use
ONLY the ambient light at its max value. Don't use anti-aliasing because
it changes the real pixel color (changing the depth too). DON'T use any kind
of GAMMA CORRECTION or DITHERING too, to avoid any source image distorsion.
- 5 -
USING CRUMBLER AFTER A 2D PAINTING PROGRAM
==========================================
If You can't use a 3d good software You can create Your source images by
using a normal 2d painting program. This will obviously make You obtain
a lower quality stereogram with *ONLY* 768 depth levels...
You can work in 2 ways: gray scaled source images or colored one.
1) Gray scale sources images could be created by using a black background
and brightening the pixel You wanna see nearest. Every gray level
corresponds to a depth level.
This is right with the +d256 options and give out a 256 depth level
stereogram.
2) You can obtain a 768 depth level stereogram by 'emulating' an image map
in this way: increasing a single value of the RGB palette You will work
on the depth level nearest the last one used (eg. [0,100,0] appears
near [0,101,0]). In this way a [0,0,0] color is the background, a
[255,0,0] or [0,255,0] or [0,0,255] color is the 255th depth level (1/3
from back), a [255,255,0] or [255,0,255] or [0,255,255] color is the
512th level (2/3 from backgrund) and [255,255,255] (white) is the
last depth level (the nearest one to You).
This is right with the +d768 option (will make You able to work on 768
different levels).
EMBOSS FILTER FOR 2D IMAGES
===========================
If You like a 2d image like a photo and You want to 'stereogrammize' it,
You can try to use an 'emboss' filter (PStyler and other photoTouch programs
are able to do that) before using crumbler. I don't suggest to use an heavy
effect. This could give an intersting aspect to Your stereograms.
Use the +d256 option with crumbler and try to diminish the source image
contrast if the stereogram seems too much crumbled.
PATTERN FILE
============
If You set the '+p<patternfile>' option You need to know how the pattern
must be.
The pattern file must be an uncompressed true color Targa image file, so
You can convert any image you like using other programs like PStyler,
Alchemy and many others.
You can use any kind of image and you can experiment new particular pattern
files (I've tried with a little navel image, but it was too less colored).
It's important that the pattern has DIFFERENT COLORS and NOT TOO MUCH PIXELS
THE SAME. Remember about this that a random pattern is ideal.
It can be also black and white (right to be printed), but there must be
irregular shapes.
A nice pattern file could be generated using FRACTINT or other fractal
programs. Try using 'PLASMA' and rielaborating the images with mirroring,
deforming and changing colors & contrasts.
- 6 -
I added a group of files (pattXXXX.tga) that can be used as pattern files.
They are all 128x768 uncompressed 24 bit Targa files, ready to be used.
They are ideal for image 1024x768 and width +w128 (as default), but they
can be used for smaller width and scaled to be used with larger width too.
INPUT DEPTH IMAGE
=================
The input image must be a depth image, such as it must have a gradient
colored 3d shape to tell CRUMBLER how far to place that shape and how
thick it should become.
The input image should appear something like this:
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░░▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░▒▒▒▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░▒▒▒▒▓▓▓▓▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░▒▒▒▒▒▓▓▓▓▒▒░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░▒▒▒▒▓▓▓▓▒▒▒░░░░░░░▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░▒▒▒▓▓▓▓▒▒▒▒░░░░░░░▒▒▓▓████████▓▓▒▒░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░▒▒▒▒▒▒▒▒▒▒▒░░░░░░░▒▒▓▓████████▓▓▒▒░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░▒▒▒▒▒▒▒▒▒▒░░░░░░░░▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░▒▒▒▒▒▒▒▒▒▒░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░░▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|░░░░░░░░░░░░
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒|░░░░░░░░░░░░
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓|░░░░░░░░░░░░
████████████████████████████████████████████████████|░░░░░░░░░░░░
| | Don't use |
| Draw here Your painting | this part |
|<------------------------------------------------->|<--------->|
0 WIDTH Xres
Really you could paint the rightest <width> pixels (CRUMBLER will work in
the same way), but they won't be used by the program.
If You were using YASM by Mitchell Brandsma You'll notice that it works with
the same input images, in facts if you set +d256 option you could use the
same pictures You were using with YASM as input for CRUMBLER (after
converting them into 24 bit .TGA).
I suggest to compress the input file when You don't need to use it, but I
don't suggest You a JPEG compression 'cause You'll loose a lot of important
information (high quality jpeg compression won't let You compress the image
enough, it isn't worth the trouble), You can use PCX 24 bit compression, or
TGA RLE, TIFF 24, and many others (use the one You prefer) (remember You
can't use GIF or other 8 bit image file format, 'cause You will loose a lot
of depth levels!)
- 7 -
OUTPUT FILE COMPRESSION
=======================
Output is another TGA uncompressed 24 bit image and now you can compress it
how You like. I suggest an high quality JPeG ("Alchemy -j80" or "-j100") or
a scaled color GIF. (high quality JPeG compression WON'T make You loose
important information, and will help saving disk space).
POSSIBLE PROBLEMS ? ---> POSSIBLE CAUSES !
==========================================
Crumbler could have any bugs I didn't saw, anyway check here if You find
a 'strange' (read 'jagged', 'overcolored', 'undercolored', 'tooMuchCrumbled',
'echoed' and so on) output file:
1) If the output file doesn't seems to have every color You used in the
pattern file and You find hard to see a stereogram in it, first check
the input file size (size = xRes*yRes*3+18) and the .TGA file type (it
MUST be an UNCOMPRESSED 24 BIT per pixel (16.7 million colors) image file).
You can check it by typing 'alchemy -x <filename>', using CSHOW or other
shower programs.
It could depend also on the '+d' parameter: check to use the correct value.
2) If the output file has NOT been registered with the given name, check for
a '00.tga' file and remember to place the source and the pattern file in
the current directory.
3) If You find a heavy echo try to use the +f option: probably using +fc
(or changing it) the echo will diminish (it could change position too...)
Choose the "+f" parameter that gives less echo.
4) If You don't use a pattern file and You find the output SIRDS too less
bright, You can compute the SIRDS by increasing the contrast or by
'trasparency adding' colors, gradient fitting or every kind of 2d image.
This will make You see #badly# the stereogram but will give a nice
appearance to the SIRDS.
IN CRUMBLER'S FUTURE
====================
Perhaps I'm gonna writing another version of CRUMBLER with new features:
∙ a cross-eyed optionally algorithm
∙ a GIF file read/write option
∙ a PCX file read/write option
. a BMP file read/write option
. a TIFF file read/write option
∙ an antiecho algorithm (I hope someone will help me with this!!)
∙ a UNIX version (maybe??)
∙ a OS/2 version (probably!)
∙ perhaps something else....
BEWARE!!!
=========
I feel I must say that watching stereograms IS DANGEROUS for Your eyes,
so don't dedicate too much time to stereograms viewing. Sure Your eyes are
more important than a stupid SIRDS!.
- 8 -
GREETINGS
=========
I would like to thank any one will e-mail
sis2g19@ganimede.csr.unibo.it
or
einn93_5@cobra.csr.unibo.it
or mail
Carlo Moretti
v. R. Medri 2050 Gattolino, Cesena (FO)
C.A.P. 47020 ITALY.
by sending observations, suggests, answers of any kind, results, new P.D.
SIRDS makers informations and documentation about ANTIECHO algorithms.
Send me money ONLY if it's on Your conscience.
Thanks to Mitchell Bransdma (I hope I wrote his name correctly) for his
YASM that gave me the 1st idea on how to create a SIRDS maker.
Special greetings to: (in alphabetical order)
Tan Cheng Ann,
Master Bo,
JJ Floyd,
Todd Hale,
Stuart Inglis,
Steve Kitton,
Dave Landry,
Ing. Emilio Munoz Vado,
Saty,
and every one contacted me about CRUMBLER 1.0.
Ciao!
-Carlo Moretti
..c@C@c..
.cC°° °°@ç.
c° /\ /\ °c
@. x .C.
.°o\./_\./°@.
.C°o\:.:/c°C.
c°o `°' c°Cc
'' I wish we were all color-blind, so we could live together peacefully and
realize that there is only one color... "The Color of Love". ,,
(Nuno Bettencourt - Extreme III)